package com.staka.website.service;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.staka.website.interfaces.Apartment;

public class ApartmentsBean implements Apartments{
	
	private Map<String, Apartment> apartments = new HashMap<String, Apartment>();
	
	public void save(Apartment apartment){
		this.apartments.put(apartment.getName(), apartment);
	}
	
	public Collection<Apartment> retrieve(){
		return this.apartments.values();
	}
	
	public Apartment retrieveSingleApartment(String name){
		return this.apartments.get(name);
	}
}
